import * as client from './client'
import urlConfig from './urlConfig'
///获取门店信息
/**
 * 请求参数
 */
export class SalesOutletRst {
    /**
     * 门店uid
     */
    public salesOutletUID: string;
}
/**
 * 返回数据
 */
export class SalesOutletRpn {
    /**
     * 门店名称
     */
    public name: string;
    public businessCategoryID: number
    public businessCategoryName: string
    public mobile: string;
    public logo: string;
    public province: number;
    public city: number;
    public district: number;
    public address: string;
    public postCode: string;
    public isSupportDelivery: string;
    public minAmountOfDelivery: number;
    public minAmountOfFreeDelivery: number;
    public deliveryFee: number;
    public longitude: number;
    public latitude: number;
    public businessHours: string;
    public deliveryTimeRange: string;
    /**
     * 门店状态
     */
    public status: number;
    public salesOutletUID: string;
    /**
     * 店铺唯一ID
     */
    public storeUID: string;
    public serviceCode: string;
    /**
     * 商家gw
     */
    public merchantCode: string;
    public operationCenterName: string;
    
    public promotionData : object;
}
/**
 * 门店状态 状态：0：申请；1：启用；2禁用
 */
export enum SalesOutletStatus {
    apply = 0,
    enable,
    disable,
}
/**
 * 获取数据
 * @param rst 参数
 */
export async function exec(rst: SalesOutletRst) {
    const data = await client.exec(urlConfig.salesOutlet, rst);
    return JSON.parse(data) as client.RSM<SalesOutletRpn>;
}
